package com.example.login;

import com.example.service.IService;
import com.vaadin.Application;

public interface ILoginService extends IService {

	public final static int LOGIN_SUCCESS = 0;
	public final static int LOGOUT_SUCCESS = 1;
	public final static int ALREADY_LOGGEDIN = 2;
	public final static int USER_BANNED = 3;
	public final static int USER_LOCKED = 4;
	public final static int LOGIN_FAILED_BAD_PASSWORD = 5;
	public final static int LOGIN_FAILED_UNKNOWN_USER = 6;
	public final static int LOGIN_FAILED_UNKNOWN_REASON = 7;
	
	
	public int validateLogin(String userName, String password, Application app);
	public String serviceName();
	public void showLoginDialog(Application app);
	public void logout(Application app, boolean auto);
	public void logoutAllUsers();
}
